import request from '@/utils/request'

// 查询标准规范评估列表
export function listAssessment(query) {
  return request({
    url: '/standard/assessment/list',
    method: 'get',
    params: query
  })
}

// 查询标准规范评估详细
export function getAssessment(sid) {
  return request({
    url: '/standard/assessment/' + sid,
    method: 'get'
  })
}

// 新增标准规范评估
export function addAssessment(data) {
  return request({
    url: '/standard/assessment',
    method: 'post',
    data: data
  })
}

// 修改标准规范评估
export function updateAssessment(data) {
  return request({
    url: '/standard/assessment',
    method: 'put',
    data: data
  })
}

// 删除标准规范评估
export function delAssessment(sid) {
  return request({
    url: '/standard/assessment/' + sid,
    method: 'delete'
  })
}

// 导出标准规范评估
export function exportAssessment(query) {
  return request({
    url: '/standard/assessment/export',
    method: 'get',
    params: query
  })
}

//====================================== private start ===============================================

// 获取已经经过技术委员会审批通过的项目列表
export function selectPrjOptions() {
  return request({
    url: '/standard/assessment/selectPrjOptions',
    method: 'get'
  })
}

// 查询标准规范附件
export function getUploadFiles(sid) {
  return request({
    url: '/standard/assessment/uploadfiles/' + sid,
    method: 'get'
  })
}

// 附件上传新增
export function addUploadFile(data) {
  return request({
    url: '/standard/assessment/attachment/add',
    method: 'post',
    data: data
  })
}

// 附件上传修改
export function updateUploadFile(data) {
  return request({
    url: '/standard/assessment/attachment/update',
    method: 'post',
    data: data
  })
}

// 附件上传删除
export function delUploadFile(data) {
  return request({
    url: '/standard/assessment/attachment/delete',
    method: 'post',
    data: data
  })
}

//====================================== private end ===============================================
